<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>IM</title>
<link rel="stylesheet" href="im.css">
</head>
<body>
	
<div id="rcs-app"></div>

</body>

<!-- 
SDK 文档：http://www.rongcloud.cn/docs/web.html#sdk
-->
<script src="//cdn.ronghub.com/RongIMLib-2.3.0.js"></script>
<!-- <script src="./libs/RongEmoji.js"></script> -->
<script src="//cdn.ronghub.com/RongEmoji-2.2.6.min.js"></script> 

<script src="./libs/utils.js"></script>
<script src="./libs/qiniu-upload.js"></script>

<script src="./template.js"></script>
<script src="./emoji.js"></script>
<script src="./im.js"></script>

<!-- 实例化 -->
<script>
/*
具体使用时：
1：切换到自己的 key 和 token
2：移除 im.js 里的 sendTextMessage(instance); 这行代码
3：自行二次开发
4：参考
    - 用户数据处理 http://support.rongcloud.cn/kb/NjQ5
    - 消息状态 http://support.rongcloud.cn/kb/NjMz
    - 集成指南 https://rongcloud.github.io/websdk-demo/integrate/guide.html
    - 其他 demo https://github.com/rongcloud/websdk-demo
*/    
(function(){
    var appKey = "3argexb6r934e";
    var token = "b/jvjEFD41TIVT0nsf9+L3ryPPkHsvRwWZV8SVI5ICcZ2I5Nl4OdNO01OjZxjjmVlD2dmk4RZ90=";

    RCS.init({
        appKey: appKey,
        token: token,
        target: document.getElementById('rcs-app'),
        showConversitionList: true,
        templates: {
            button: ['<div class="rongcloud-consult rongcloud-im-consult">',
                    '   <button onclick="RCS.showCommon()"><span class="rongcloud-im-icon">进入 IM</span></button>',
                    '</div>',
                    '<div class="customer-service" style="display: none;"></div>'].join('')//"templates/button.html",
            // chat: "templates/chat.html",
            // closebefore: 'templates/closebefore.html',
            // conversation: 'templates/conversation.html',
            // endconversation: 'templates/endconversation.html',
            // evaluate: 'templates/evaluate.html',
            // imageView: 'templates/imageView.html',
            // leaveword: 'templates/leaveword.html',
            // main: 'templates/main.html',
            // message: 'templates/message.html',
            // messageTemplate: 'templates/messageTemplate.html',
            // userInfo: 'templates/userInfo.html', 
        },
        extraInfo: {
            // 当前登陆用户信息
            userInfo: {
                name: "游客",
                grade: "VIP"
            },
            // 产品信息
            requestInfo: {
                productId: "123",
                referrer: "10001",
                define: "" // 自定义信息
            }
        }
    });
})()


</script>

</html>